<template>
  <swiper class="detail-swiper">
    <swiper-item
      class="swiper-item"
      v-for="item in topImages"
      :key="item.index"
    >
      <img :src="item" alt="" @load="imageLoad"/>
    </swiper-item>
  </swiper>
</template>

<script>
import Swiper from "components/common/swiper/Swiper.vue";
import SwiperItem from "components/common/swiper/SwiperItem.vue";

export default {
  components: { Swiper, SwiperItem },
  name: "DetailSwiper",
  data() {
    return {};
  },
  props: {
    topImages: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  methods: {
    imageLoad(){
      this.$emit('swiperImageLoad')
    }
  },
};
</script>

<style scoped>
.swiper-item {
  height: 300px;
  overflow: hidden;
}
</style>
